package com.train.batch.event;

import com.train.batch.enums.impl.JobOperationEnums;
import org.springframework.context.ApplicationEvent;

/**
 * @author: baitiaojun
 * @date: 2025/2/26
 * @description: 定时任务同步事件
 */
public class JobSyncEvent extends ApplicationEvent {

    private final String jobName;

    private final String groupName;

    private String cronExpress;

    private final JobOperationEnums operationEnums;

    public JobSyncEvent(Object source, String jobName, String groupName, String cronExpress, JobOperationEnums jobOperationEnums) {
        super(source);
        this.jobName = jobName;
        this.groupName = groupName;
        this.cronExpress = cronExpress;
        this.operationEnums = jobOperationEnums;
    }

    public JobSyncEvent(Object source, String jobName, String groupName, JobOperationEnums jobOperationEnums) {
        super(source);
        this.jobName = jobName;
        this.groupName = groupName;
        this.operationEnums = jobOperationEnums;
    }

    public String getJobName() {
        return jobName;
    }

    public String getGroupName() {
        return groupName;
    }

    public String getCronExpress() {
        return cronExpress;
    }

    public JobOperationEnums getOperationEnums() {
        return operationEnums;
    }
}
